package com.ht.service.impl;

import com.ht.domain.po.TbDoctor;
import com.ht.mapper.DoctorMapper;
import com.ht.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 医生表server
 */
@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorMapper doctorMapper;


    /**
     * 根据医生id修改医生审核状态
     * @param doctorId 医生id
     * @param auditStatus 状态
     * @return
     */
    @Override
    public int updateDoctorAuditStatusByDoctorId(Long doctorId, Integer auditStatus) {
        TbDoctor doctor = doctorMapper.selectById(doctorId);
        doctor.setAuditStatus(auditStatus);
        return doctorMapper.updateById(doctor);
    }
}
